package com.my.aslife.module.common;


public enum ErrorCode {
    // 后端状态 1000 ~ 1999
    FAIL_LOGIN_ILLEGAL("1001", "账号违规，暂不提供服务"),
    FAIL_LOGIN_ERROR_USERNAME_PASSWORD("1003","账号或密码不正确"),
    OPERATOR_FAST("1004","操作太快，请稍后重试"),
    TAIL_LOGIN_NO("1005", "未登录"),
    TAIL_LOGIN_NO_USERNAME("1006", "用户名不存在"),
    TAIL_CHECK_FAST("1008","点击太快了"),
    ERROR_REGISTER_USERNAME_YES("1009","用户名已经存在"),
    ERROR_REGISTER_FAILED("1010","注册失败，请稍后再试~"),
    NOT_AUTHORITY("1012","没有权限修改，清联系管理员"),
    ERROR_ADD_NIKENAME_AVATAR("1013","初始化昵称，头像地址失败"),
    NOT_DELETE_AUTHORITY("1014","权限不足"),

    // token
    ILLEGAL_LOGIN("1015", "非法登录"),
    TOKEN_NOT_FOUND("1016", "登录状态已经过期，请重新登录"),
    TOKEN_REFRESH_ERROR("1017", "token刷新失败"),
    TOKEN_IS_ILLEGAL("1018", "token非法"),

    // 参数问题 2000~2999
    PARAMS_NOT_NULL("2000", "必要参数不能为空或检查JSON是否正确"),
    C_PARAMS_NOT_NULL("2001", "参数不能为空"),
    EMAIL_PUSH_USERNAME_NOT_NULL("2002","邮件收信人不能为空"),
    EMAIL_PUSH_TOPIC_NOT_NULL("2003","邮件主题不能为空"),
    EMAIL_PUSH_CONTEXT_NOT_NULL("2004","邮件内容不能为空"),
    ILLEGAL_OPERATOR("2005","非法操作"),

    // APP 3000~3999
    EMAIL_IS_FAST("3000","请勿频发送邮件"),
    EMAIL_OR_USER_NAME_EXISTS("3001","邮箱或用户名已经存在"),
    VERITY_CODE_ILLEGAL("3002","验证码非法"),
    VERITY_CODE_ERROR("3003","验证码错误"),
    REGISTER_PARAS_NULL("3004","必要参数用户名，密码不能为空"),
    APP_PARAMS_NOT_NULL("3004","请输入合理参数"),
    EMAIL_ERROR("3005","邮件不正确"),
    EMAIL_NO_TIMES("3006","今日发送邮件次数已用完"),
    EMAIL_EXISTS("3007","该邮件已经被注册"),
    EMAIL_CODE_EXPIRE("3008","邮件验证码已经过期"),
    OLD_PWD_IS_NEW_PWD("3009","旧密码与原密码相同"),
    NOT_CHANGE_ADDRESS("3010","只能修改一次订单信息"),
    ERROR_FEEDBACK("3011","意见反馈字数大于5"),
    NOT_FOUND_USER("3012","该邮箱不存在"),
    NICKNAME_HAVE_SENSITIVE("3013","昵称包含敏感词"),
    NOT_CHANGE_NICKNAME("3014","一周只能修改一次昵称"),
    UPLOAD_FAILED("3015","图片上传失败"),
    FAST_APPLY_RUNNER("3016", "审核已经提交"),
    ERROR_TASK_DELETE("3017","不完整任务，已删除"),
    NOT_SEND_EMAIL_REMINDER("3018","您已经催单成功，请勿频繁催单"),
    ERROR_REMINDER("3019","该订单暂未生产，催单失败"),
    ESTIMATE_SENSITIVE("3020","回复内容包含敏感词"),
    MONEY_NOT_GOOD_ENOUGH("3021", "余额不足"),
    CONSULT_IS_COMMITTED("3022","协商已提交，请等待管理员处理"),
    ORDERS_IS_NOT_FOUNT("3023", "订单已失效，请联系客服"),
    TRANSFER_ORDERS_FAIL("3024", "余额不足"+(Constant.TRANSFER_MONEY/10)+"元，不能转单"),


    // 配送者 R3000~R3999
    TASK_ACCEPTED("R3000", "您抢慢了一步喔~"),
    ILLEGAL_TASK("R3001", "违规抢单"),

    // 数据操作错误定义
    BODY_NOT_MATCH("4000","请求的数据格式不符!"),
    SIGNATURE_NOT_MATCH("4001","请求的数字签名不匹配!"),
    NOT_FOUND("4004", "未找到该资源!"),
    INTERNAL_SERVER_ERROR("5000", "服务器内部错误!"),
    ERROR_SYSTEM_BUSY("5003","服务器正忙，请稍后再试!"),

    // 系统异常参数 9000~9999
    FAIL_SYSTEM("9000","参数异常请检查"),
    FAIL_QUERY("9001", "查询失败"),

    ;

    private final String code;
    private final String message;

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }

}
